package easymall.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import easymall.po.Category;
import easymall.po.Products;
import easymall.pojo.MyPage;
import easymall.pojo.MyProducts;

public interface ProductsService {
	public List<Category> allcategorys();
	
	public List<Products> prodlist(Map<String, Object> map); 
	
	public Products oneProduct(String pid);
	
	public List<Products> proclass(Integer category);
	
	public String save(MyProducts myproducts, HttpServletRequest request);
	
	//分页相关
	public List<Category> getCategorysByPage(Integer page);
	public List<Products> getProductsByPage(Integer page); //根据页号获取商品
	public int getTotalPage();
	public int getTotalPageByProducts();
	
	//类别相关
	public int updateCategory(Category category); //更新
	public int saveCategory(String name);  //新增
	public int delCategory(Integer id); //删除某个类别
	
	//商品相关
	public String updatePruduct(MyProducts myproducts, HttpServletRequest request, String id); //更新
	public int delProduct(String id); //删除某个商品
}
